<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>jq</title>
</head>
<style>
	
</style>
<script src="jquery.js"></script>

<body>

	<img src="a.jpg" alt="" id="imgid">	

</body>
<script>
	//把dom对象转换为jquery对象
	imgobj=document.getElementById('imgid');
	/*imgobj.onclick=function(){ //onclick事件
		this.src='b.jpg';
	}*/

	$(imgobj).click(function(){ //click方法
		this.src='b.jpg';
	});
	
	
	
</script>
</html>